//
//  NVPopoverView.h
//  NVPopoverViewTest
//
//  Created by Yi Lin on 6/18/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {
    NVPopoverPositionCenter     = 1,
    NVPopoverPositionBelow      = 2,
    NVPopoverPositionAbove      = 3,
    NVPopoverPositionLeft       = 4,
    NVPopoverPositionRight      = 5,
    NVPopoverPositionAny        = 6
}NVPopoverPosition;

@protocol NVPopoverViewDelegate;

@interface NVPopoverView : UIView<UIGestureRecognizerDelegate>

@property (assign,nonatomic) id<NVPopoverViewDelegate> delegate;

@property (strong,nonatomic) UIImage *arrowImage;

@property (strong,nonatomic) UIImage *separatorline;

@property (strong,nonatomic) UIView *componentsView;

+ (NVPopoverView *)sharedPopoverView;

+ (BOOL)popoverIsShowed; 

+ (void)dismissPopoverViewAnimated:(BOOL)animate;

+ (void)slideOutPopoverView;

- (void)showPopoverViewInView:(UIView *)targetView position:(NVPopoverPosition)thePosition animated:(BOOL)animate;

- (void)removeAllSubviews;

@end

@protocol NVPopoverViewDelegate <NSObject>

@optional
- (void)popoverViewWillAppear:(NVPopoverView *)popOverView;
- (void)popoverViewDidAppear:(NVPopoverView *)popOverView;
- (void)popoverViewWillDismiss:(NVPopoverView *)popOverView;
- (void)popoverViewDidDismiss:(NVPopoverView *)popOverView;

@end
